package cn.wolfcode.wolf2w.common.redis.util;

import lombok.Getter;

@Getter
public enum RedisKeys {
        USER_NOTE_THUMBSUP("user_note_thumbsup",-1L),
        USER_NOTE_FAVOR("user_note_favor",-1L),
        NOTE_STATIS_HASH("note_statis_hash",-1L),
        USER_STRATEGY_THUMBSUP("user_strategy_thumbsup",-1L),
        USER_STRATEGY_FAVOR("user_strategy_favor",-1L),
        STRATEGY_STATIS_HASH("strategy_statis_hash",-1L),
        VERIFY_CODE("verify_code",5*60);


    private String prefix;
    private long time;
    private RedisKeys(String prefix,long time){
        this.prefix=prefix;
        this.time=time;
    }


    public String join(String... value){
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append(this.prefix);
        for (String string : value) {
            stringBuffer.append(":").append(string);
        }
        return stringBuffer.toString();
    }

}
